﻿using System;
using System.Collections.Generic;

namespace Simp.Model.CoreExpressions.Sequences
{
	/// <summary>Represents a component accessing elements of a sequence.</summary>
	/// <remarks>Elements do not have to be simplified when accessed via enumeration.</remarks>
	public interface ISequenceAccessor : IEnumerable<IExpression>
	{
		/// <summary>Returns the number of elements in the sequence.</summary>
		int Count { get; }

		/// <summary>Returns a given element of a sequence.</summary>
		/// <remarks>Sequences are zero-based in <c>Simp</c>.</remarks>
		/// <param name="index"></param>
		/// <returns></returns>
		IExpression this[int index] { get; }
	}
}